From: Lars Magne Ingebrigtsen Date: Thu, 21 Oct 2010 01:49:12 +0000 (+0000) Subject: message.el (message-fix-before-sending): Change options when sending non-printable... X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~6020 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ae53be1c14be52bb74b6c122466f607ed39b811a;p=emacs.git message.el (message-fix-before-sending): Change options when sending non-printable characters. shr.el (shr-add-font): Don't put the font properties on the newline or the indentation. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d32cfa8af8d..b290e84ac8f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,11 @@ 2010-10-21 Lars Magne Ingebrigtsen + * shr.el (shr-add-font): Don't put the font properties on the newline + or the indentation. + + * message.el (message-fix-before-sending): Change options when sending + non-printable characters. + * gnus.el (gnus-update-message-archive-method): Change the default to monthly outgoing groups. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index ce72984c886..f4c21aa5b4a 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4206,7 +4206,7 @@ conformance." (?r ,(format "Replace non-printable characters with \"%s\" and send" message-replacement-char)) - (?i "Ignore non-printable characters and send") + (?s "Send as is without removing anything") (?e "Continue editing")))) (if (eq choice ?e) (error "Non-printable characters")) diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index acf47aa254a..9645f04e0a4 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -318,9 +318,20 @@ redirects somewhere else." (dolist (type types) (shr-add-font (or shr-start (point)) (point) type)))) +;; Add an overlay in the region, but avoid putting the font properties +;; on blank text at the start of the line, and the newline at the end, +;; to avoid ugliness. (defun shr-add-font (start end type) - (let ((overlay (make-overlay start end))) - (overlay-put overlay 'face type))) + (save-excursion + (goto-char start) + (while (< (point) end) + (when (bolp) + (skip-chars-forward " ")) + (let ((overlay (make-overlay (point) (min (line-end-position) end)))) + (overlay-put overlay 'face type)) + (if (< (line-end-position) end) + (forward-line 1) + (goto-char end))))) (defun shr-browse-url () "Browse the URL under point."